<template>
	<view class="content">

		<view class="header">
			<view class="title">
				<text>我的校园</text>
			</view>

			<view class="school_user">
				<view class="school_user_left">
					<image src="../../../static/school/tx.png" mode=""></image>
					<text>校园名称</text>
				</view>
				<view class="school_user_right" @click="tosf()">
					<image src="../../../static/school/qh.png" mode=""></image>
					<text>切换校园</text>
				</view>
			</view>

			<view class="myschool">
				<view class="myschool_tit">
					<text>我的校园</text>
				</view>

				<view class="myschool_list">
					<view class="myschool_list1" v-for="(item,index) in myschoollist" @click="tomyschoollist(item.id)">
						<image :src="item.img" mode=""></image>
						<text>{{item.title}}</text>
					</view>
				</view>
			</view>


			<view class="schoolmanage">
				<view class="schoolmanage_tit">
					<text>校园管理</text>
				</view>

				<view class="schoolmanage_list">
					<view class="schoolmanage_list1" v-for="(item,index) in schoolmanagelist"
						@click="schoolmanage(item.id)">
						<image :src="item.img" mode=""></image>
						<text>{{item.title}}</text>
					</view>
				</view>
			</view>


			<view class="course">
				<view class="course_tit">
					<text>课程管理</text>
				</view>

				<view class="course_list">
					<view class="course_list1" v-for="(item,index) in courselist" @click="course(item.id)">
						<image :src="item.img" mode=""></image>
						<text>{{item.title}}</text>
					</view>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				a: 0,
				b: 0,
				c:0,
				myschoollist: [{
						id: 0,
						img: '../../../static/class/goods.png',
						title: '校园简介'
					},
					{
						id: 1,
						img: '../../../static/class/goods.png',
						title: '代办事项'
					},
					{
						id: 2,
						img: '../../../static/class/goods.png',
						title: '服务商'
					},
					{
						id: 3,
						img: '../../../static/class/goods.png',
						title: '校园转移'
					}
				],
				schoolmanagelist: [{
						id: 0,
						img: '../../../static/class/goods.png',
						title: '学生管理'
					},
					{
						id: 1,
						img: '../../../static/class/goods.png',
						title: '老师管理'
					},
					{
						id: 2,
						img: '../../../static/class/goods.png',
						title: '班级管理'
					}
				],
				courselist: [{
						id: 0,
						img: '../../../static/class/goods.png',
						title: '校园套餐'
					},
					{
						id: 1,
						img: '../../../static/class/goods.png',
						title: '购买记录'
					},
					{
						id: 2,
						img: '../../../static/class/goods.png',
						title: '特色课'
					},
					{
						id: 3,
						img: '../../../static/class/goods.png',
						title: '校园特色课'
					}
				],
			}
		},
		methods: {
			tosf() {
				uni.navigateTo({
					url: '/pages/school/myschool/switch_identity'
				})
			},
			course(id) {
				console.log(id)
				this.a = id
				if (this.a == 0) {
					uni.navigateTo({
						url: '/pages/school/myschool/school_package'
					})
				} else if (this.a == 4) {
					uni.navigateTo({
						url: '/pages/school/myschool/characteristic_buyrecord'
					})
				}else if(this.a ==1){
					uni.navigateTo({
						url:'/pages/school/myschool/buy_record'
					})
				}else if(this.a==2){
					uni.navigateTo({
						url:'/pages/school/myschool/school_characteristic'
					})
				}else if(this.a==3){
					uni.navigateTo({
						url:'/pages/school/myschool/characteristic_course'
					})
				}
			},
			schoolmanage(id) {
				this.b = id
				if (this.b == 0) {
					uni.navigateTo({
						url:'/pages/school/myschool/student_admin'
					})
				}else if(this.b==1){
					uni.navigateTo({
						url:'/pages/school/myschool/teacher_admin'
					})
				}else if(this.b==2){
					uni.navigateTo({
						url:'/pages/school/myschool/class_admin'
					})
				}else if(this.b==3){
					uni.navigateTo({
						url:'/pages/school/myschool/add_schoolpake'
					})
				}
			},
			tomyschoollist(id){
				this.c=id
				if(this.c==0){
					uni.navigateTo({
						url:'/pages/school/myschool/school_introduction'
					})
				}else if(this.c==1){
					// uni.navigateTo({
					// 	url:'/pages/school/myschool/supplier_product'//切换校园
					// })
					
					uni.navigateTo({
						url:'/pages/factory/myfactory/matter'
					})
				}else if(this.c==2){
					uni.navigateTo({
						url:'/pages/school/myschool/service'
					})
					
					
				}else if(this.c==3){
				
				}
			}
		}
	}
</script>

<style>
	.content {
		height: 100vh;
		background: #FAFAFA;
	}

	.header {
		width: 750rpx;
		height: 480rpx;
		background: linear-gradient(180deg, #1789FF 0%, #93C3F9 100%);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.title {
		display: flex;
		justify-content: center;
		padding-top: 118rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
	}

	.school_user {
		display: flex;
		margin-top: 36rpx;
		align-items: center;
		padding-left: 30rpx;
		padding-right: 30rpx;
	}

	.school_user_left {
		display: flex;
		align-items: center;
	}

	.school_user_left image {
		width: 104rpx;
		height: 104rpx;
	}

	.school_user_left text {

		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #FFFFFF;
		margin-left: 32rpx;
	}

	.school_user_right {
		width: 196rpx;
		height: 80rpx;
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin-left: auto;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.school_user_right image {
		width: 32rpx;
		height: 40rpx;
	}

	.school_user_right text {
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #666666;
	}

	.myschool {
		width: 690rpx;
		height: 294rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(199, 199, 199, 0.1);
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		margin: 40rpx auto 40rpx;
	}

	.myschool_tit {

		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
		padding-top: 24rpx;
		padding-left: 24rpx;
	}

	.myschool_list {
		display: flex;
		margin-top: 36rpx;
	}

	.myschool_list1 {
		width: 25%;
		display: flex;
		flex-direction: column;
	}

	.myschool_list1 image {
		width: 96rpx;
		height: 96rpx;
		margin: auto;
	}

	.myschool_list1 text {

		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #333333;
		margin: 8rpx auto 0;
	}

	.schoolmanage {
		width: 690rpx;
		height: 294rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(199, 199, 199, 0.1);
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		margin: 40rpx auto 40rpx;
	}

	.schoolmanage_tit {
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
		padding-top: 24rpx;
		padding-left: 24rpx;
	}

	.schoolmanage_list {
		display: flex;
		margin-top: 36rpx;
	}

	.schoolmanage_list1 {
		width: 25%;
		display: flex;
		flex-direction: column;
	}

	.schoolmanage_list1 image {
		width: 96rpx;
		height: 96rpx;
		margin: auto;
	}

	.schoolmanage_list1 text {

		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #333333;
		margin: 8rpx auto 0;
	}

	.course {
		width: 690rpx;
		height: 294rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(199, 199, 199, 0.1);
		border-radius: 12rpx 12rpx 12rpx 12rpx;
		margin: 40rpx auto 40rpx;
	}

	.course_tit {
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
		padding-top: 24rpx;
		padding-left: 24rpx;
	}





	.course_list {
		display: flex;
		margin-top: 36rpx;
	}

	.course_list1 {
		width: 25%;
		display: flex;
		flex-direction: column;
	}

	.course_list1 image {
		width: 96rpx;
		height: 96rpx;
		margin: auto;
	}

	.course_list1 text {

		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #333333;
		margin: 8rpx auto 0;
	}
</style>